{extend name="public/base" /}

{block name="title"}<title>{if condition="$data"}{$Think.lang.edit}{else /}{$Think.lang.create}{/if}</title>{/block}

{block name="pjax_container"}
<div class="hry-content-wrapper">
<section class="content-header">
    <ol class="breadcrumb">
		<li>项目管理</li>
        <li class="active">审核项目</li>
    </ol>
</section>
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <form class="form-horizontal" method="POST" action="" onsubmit="return false" >
                <input type="hidden" name="id" value="{$data.id}" />
                <div class="nav-tabs-custom">
                    <ul class="nav nav-tabs">
                        <li class="active"><a href="#tab_base" data-toggle="tab">项目信息</a></li>
                        
                        {if condition=" $mods == 'addonvideo' "}
                        <li><a href="#tab_video" data-toggle="tab">{$Think.lang.video_param}</a></li>
                        {elseif condition=" $mods == 'addonalbum' "/}
                        <li><a href="#tab_album" data-toggle="tab">{$Think.lang.album_param}</a></li>
                        {else /}
                        {/if}
                        
                        <!-- <li><a href="#tab_advanced" data-toggle="tab">{$Think.lang.advanced_param}</a></li> -->
                        <li class="pull-right"><a href="javascript:history.back(-1)" class="btn btn-sm" style="padding:10px 2px;"><i class="fa fa-list"></i> {$Think.lang.back}</a></li>
                    </ul>
                    <div class="tab-content">
					
						<div class="tab-pane active" id="tab_base">
							<div class="form-group">
								<label class="col-sm-2 control-label">{$Think.lang.project_name}</label>
								<div class="col-sm-7"><input class="form-control" name="project_name" value="{$data.project_name}" disabled placeholder="{$Think.lang.project_name}"></div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">{$Think.lang.target_code}</label>
								<div class="col-sm-7"><input class="form-control" name="target_code" value="{$data.target_code}" disabled placeholder="{$Think.lang.target_code}"></div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">{$Think.lang.min_code}</label>
								<div class="col-sm-7"><input class="form-control" name="min_code" value="{$data.min_code}" disabled placeholder="{$Think.lang.min_code}"></div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">{$Think.lang.max_code}</label>
								<div class="col-sm-7"><input class="form-control" name="max_code" value="{$data.max_code}" disabled placeholder="{$Think.lang.max_code}"></div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">{$Think.lang.anticipated_profits}</label>
								<div class="col-sm-7"><input class="form-control" name="anticipated_profits" value="{$data.anticipated_profits}" disabled placeholder="{$Think.lang.anticipated_profits}"></div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">{$Think.lang.project_type}</label>
								<div class="col-sm-7">
									<select class="form-control" name="project_type" disabled style="width:100%;">
										<option value="1" {if condition="$data.project_type eq '1'"}selected="selected"{/if} >{$Think.lang.project_type1}</option>
										<option value="2" {if condition="$data.project_type eq '2'"}selected="selected"{/if} >{$Think.lang.project_type2}</option>
									</select>
								</div>
							</div>
							{if condition="$data.project_type eq '2'"}
							<div class="form-group show_type">
								<label class="col-sm-2 control-label">--</label>
								<div class="col-sm-7">
										<input class="form-control" name="single_num" value="{$data.single_num}" disabled placeholder="份额数量"><br/>
										<input class="form-control" name="single_mon" value="{$data.single_mon}" disabled placeholder="单笔份数金额">
								</div>
							</div>
							{/if}
							<div class="form-group">
								<label class="col-sm-2 control-label">{$Think.lang.start_time}</label>
								<div class="col-sm-7">
									<div class="input-group">
										<input class="form-control timepicker"  name="start_time" value="{$data.start_time}" disabled placeholder="{$Think.lang.start_time}" >
										<div class="input-group-addon"><i class="fa fa-clock-o"></i></div>
									</div>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">{$Think.lang.end_time}</label>
								<div class="col-sm-7">
									<div class="input-group">
										<input class="form-control timepicker" name="end_time" value="{$data.end_time}" disabled placeholder="{$Think.lang.end_time}" >
										<div class="input-group-addon"><i class="fa fa-clock-o"></i></div>
									</div>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">{$Think.lang.release_time}</label>
								<div class="col-sm-7">
									<div class="input-group">
										<input class="form-control timepicker" name="release_time" value="{$data.release_time}" disabled placeholder="{$Think.lang.release_time}" >
										<div class="input-group-addon"><i class="fa fa-clock-o"></i></div>
									</div>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">{$Think.lang.support_type}</label>
								<div class="col-sm-7">
									<select class="form-control" name="support_type" disabled style="width:100%;">
										<option value="1" {if condition="$data.support_type eq '1'"}selected="selected"{/if} >{$Think.lang.support_type1}</option>
										<option value="0" {if condition="$data.support_type eq '0'"}selected="selected"{/if} >{$Think.lang.support_type0}</option>
									</select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">{$Think.lang.initiator}</label>
								<div class="col-sm-7">
									<select class="form-control" name="initiator" disabled style="width:100%;">
										<option value="0">{$Think.lang.empty_initiator}</option>
										{volist name="companyList" id="companylist"}
										<option value="{$companylist.id}" {if condition="$data.initiator eq $companylist.id"}selected="selected"{/if} >{$companylist.company_name}</option>
										{/volist}
									</select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">{$Think.lang.tag}</label>
								<div class="col-sm-7">
								{volist name='TagList' id='tag'}
									<label class="checkbox-inline"><input type="checkbox" name="tags[]" disabled value="{$tag.id}" {if condition=" in_array($tag.id, $data.tags) "}checked="checked"{/if} class="minimal"> {$tag.tag_name}</label>
								{/volist}
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">{$Think.lang.thumb}</label>
								<div class="col-sm-7">
									<div class="input-group">
										<input class="form-control" name="thumb" value="{$data.thumb}" disabled placeholder="{$Think.lang.thumb}" >
										<span class="input-group-btn">
											<a href="{$data.thumb|default='/static/global/face/no-image.png'}" target="_blank" >
												<img src="{$data.thumb|default='/static/global/face/no-image.png'}" style="height:34px; width:68px;" />
											</a>
											<button class="btn btn-success btn-flat up-btn" type="button" disabled data-url="{:url('Uploads/upload')}?dir=project">
												<i class="fa fa-cloud-upload"> {$Think.lang.Upload}</i>
											</button>
										</span>
									</div>
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-2 control-label">{$Think.lang.keywords}</label>
								<div class="col-sm-7"><input class="form-control" name="keywords" value="{$data.keywords}" disabled placeholder="{$Think.lang.keywords}"></div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">{$Think.lang.description}</label>
								<div class="col-sm-7"><textarea class="form-control" style="resize:none;height:100px;" disabled name="description" placeholder="{$Think.lang.description}">{$data.description}</textarea></div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">{$Think.lang.des}</label>
								<div class="col-sm-7"><textarea class="form-control" name="des" disabled placeholder="{$Think.lang.des}">{$data.des}</textarea></div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">{$Think.lang.detail}</label>
								<div class="col-sm-7"><textarea class="form-control" name="detail" disabled placeholder="{$Think.lang.detail}">{$data.detail}</textarea></div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">{$Think.lang.risk}</label>
								<div class="col-sm-7"><textarea class="form-control" style="resize:none;height:100px;" disabled name="risk" placeholder="{$Think.lang.risk}">{$data.risk}</textarea></div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">{$Think.lang.elses}</label>
								<div class="col-sm-7"><textarea class="form-control" style="resize:none;height:100px;" disabled name="elses" placeholder="{$Think.lang.elses}">{$data.elses}</textarea></div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">{$Think.lang.create_time}</label>
								<div class="col-sm-7">
									<div class="input-group">
										<input class="form-control timepicker" name="create_time" value="{$data.create_time}" disabled placeholder="{$Think.lang.create_time}" >
										<div class="input-group-addon"><i class="fa fa-clock-o"></i></div>
									</div>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">审核状态</label>
								<div class="col-sm-7">
									<select class="form-control" name="status" style="width:100%;" >
										<option value="0" >待审核</option>
										<option value="1" >通过</option>
										<option value="-2" >拒绝</option>
									</select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">审核备注</label>
								<div class="col-sm-7"><textarea class="form-control" style="resize:none;height:100px;" name="agreeNotice" placeholder="项目拒绝时必填">{$data.agreeNotice}</textarea></div>
							</div>
						</div>
                    </div>
                    <div class="box-footer">
                        <div class="col-sm-2"></div>
                        <div class="col-sm-7">
                            <div class="btn-group pull-right">
                                <button type="submit" class="btn btn-info pull-right submits" data-loading-text="&lt;i class='fa fa-spinner fa-spin '&gt;&lt;/i&gt; {$Think.lang.submit}">{$Think.lang.submit}</button>
                            </div>
                            <div class="btn-group pull-left">
                                <button type="reset" class="btn btn-warning">{$Think.lang.reset}</button>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</section>
</div>
<script type="text/javascript">
var KDEDT_DELETE_URL = '{:url("Uploads/delete")}';   //【删除地址】如果有使用到KindEditor编辑器的文件空间删除功能，必须添加该删除地址全局变量

$(function(){
    /*ajax页面加载icheck，有该控件的页面才需要*/
    $('input[type="checkbox"].minimal, input[type="radio"].minimal').iCheck({
        checkboxClass: 'icheckbox_minimal-blue',
        radioClass: 'iradio_minimal-blue'
    });
    
    /*ajax页面加载icheck，有该控件的页面才需要*/
    $(".select2").select2({language:"zh-CN"});
    
    $('.timepicker').datetimepicker({
        format: 'YYYY-MM-DD HH:mm:ss',   //YYYY-MM-DD HH:mm:ss
        locale: moment.locale('zh-cn')
    });
    
    $("#ck-jumplink").on('ifChecked', function(event){
        $("#jumplink").removeClass("hide");
    });
    $('#ck-jumplink').on('ifUnchecked', function(event){
        $("#jumplink").addClass("hide");
    });
    
    KindEditor.create('textarea[name="des"]',{
        width : '100%',   //宽度
        height : '320px',   //高度
        resizeType : '0',   //禁止拖动
        allowFileManager : true,   //允许对上传图片进行管理
        uploadJson : '{:url("Uploads/upload")}',   //文件上传地址
        fileManagerJson : '{:url("Uploads/manager")}',   //文件管理地址
        //urlType : 'domain',   //带域名的路径
        formatUploadUrl: true,   //自动格式化上传后的URL
        autoHeightMode: false,   //开启自动高度模式
        afterBlur: function () { this.sync(); }   //同步编辑器数据
    });

    KindEditor.create('textarea[name="detail"]',{
        width : '100%',   //宽度
        height : '320px',   //高度
        resizeType : '0',   //禁止拖动
        allowFileManager : true,   //允许对上传图片进行管理
        uploadJson : '{:url("Uploads/upload")}',   //文件上传地址
        fileManagerJson : '{:url("Uploads/manager")}',   //文件管理地址
        //urlType : 'domain',   //带域名的路径
        formatUploadUrl: true,   //自动格式化上传后的URL
        autoHeightMode: false,   //开启自动高度模式
        afterBlur: function () { this.sync(); }   //同步编辑器数据
    });	
    {if condition=" $rest_login == 1 "}
    restlogin('{$rest_login_info}');   //登录超时
    {/if}
})
</script>
{/block}